package it.hive.mediaplayer.task.loader;

import java.net.URL;

import javafx.concurrent.Task;
import javafx.scene.media.Media;

public class MediaLoader extends Task<Media> {

	private URL url;

	public MediaLoader(URL url) {
		this.url = url;
		new Thread(this).start();
	}

	@Override
	protected Media call() throws Exception {
		return new Media(url.toString());
	}

}
